package org.dromara.patrol.mapper;

import org.apache.ibatis.annotations.Param;
import org.dromara.common.mybatis.core.mapper.BaseMapperPlus;
import org.dromara.patrol.domain.PatrolActionStatistics;
import org.dromara.patrol.domain.bo.PatrolActionQuery;
import org.dromara.patrol.domain.bo.StatisticsCountBo;
import org.dromara.patrol.domain.vo.*;

import java.util.List;

/**
 * 巡店管理-巡店行为统计Mapper接口
 *
 * @author han
 * @date 2024-04-19
 */
public interface PatrolActionStatisticsMapper extends BaseMapperPlus<PatrolActionStatistics, PatrolActionStatisticsVo> {

    /**
     * 查询任务状态
     * @param query
     * @return
     */
    TaskStatusVo selectTaskStatus(@Param("query") PatrolActionQuery query);

    /**
     * 查询门店覆盖情况
     * @param query
     * @return
     */
    List<StoreCoverVo> selectStoreCoverPage( @Param("query") PatrolActionQuery query);


    /**
     * 查询门店未覆盖情况
     * @param query
     * @return
     */
    List<StoreCoverVo>  selectStoreNotCovered( @Param("query") PatrolActionQuery query);

    /**
     * 报告按时完成统计
     * @param query
     * @return
     */
    PatrolFinishVo selectReportFinishOnTime(@Param("query")  PatrolActionQuery query);

    /**
     * 巡店情况统计
     * @param query
     * @return
     */
    PatrolSituationCountVo selectPatrolSituationCount(@Param("query") PatrolActionQuery query);

    List<ProblemRankVo> getProblemRank(@Param("bo") StatisticsCountBo bo, @Param("timeVo") StatisticsCountTimeVo timeVo);
}
